package com.yangzb.neo4j.repository;

import com.yangzb.neo4j.node.StudentNode;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.neo4j.repository.query.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface StudentRepository extends Neo4jRepository<StudentNode,Long>, CrudRepository<StudentNode,Long> {

    @Query("match(n:Student{id:{id}}) return n.name")
    public String existsStudentNodeById(Long id);
}

